/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mongoosehome.web.common.domain;

import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 *
 * @author Administrator
 */
public class TModule implements Serializable{
    
    private int moduleId;       //模块ID
    private String moduleName;  //模块名称
    private String moduleUrl;   //模块的链接
    private int level;          //层次
    private boolean leaf;       //是否是叶子节点
    private TModule parent;     //父节点
    private List<TModule> children ;       //子节点

    private Set<TRole> roles = new HashSet<TRole>(0);   //角色信息
    /**
     * @return the moduleId
     */
    public int getModuleId() {
        return moduleId;
    }

    /**
     * @param moduleId the moduleId to set
     */
    public void setModuleId(int moduleId) {
        this.moduleId = moduleId;
    }

    /**
     * @return the moduleName
     */
    public String getModuleName() {
        return moduleName;
    }

    /**
     * @param moduleName the moduleName to set
     */
    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    /**
     * @return the moduleUrl
     */
    public String getModuleUrl() {
        return moduleUrl;
    }

    /**
     * @param moduleUrl the moduleUrl to set
     */
    public void setModuleUrl(String moduleUrl) {
        this.moduleUrl = moduleUrl;
    }

    /**
     * @return the level
     */
    public int getLevel() {
        return level;
    }

    /**
     * @param level the level to set
     */
    public void setLevel(int level) {
        this.level = level;
    }

    /**
     * @return the leaf
     */
    public boolean isLeaf() {
        return leaf;
    }

    /**
     * @param leaf the leaf to set
     */
    public void setLeaf(boolean leaf) {
        this.leaf = leaf;
    }

    /**
     * @return the parent
     */
    public TModule getParent() {
        return parent;
    }

    /**
     * @param parent the parent to set
     */
    public void setParent(TModule parent) {
        this.parent = parent;
    }

    public List<TModule> getChildren() {
        return children;
    }

    public void setChildren(List<TModule> children) {
        this.children = children;
    }

    public Set<TRole> getRoles() {
        return roles;
    }

    public void setRoles(Set<TRole> roles) {
        this.roles = roles;
    }
    
}
